projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3b4aad7
)
Throw an error when a display is missing
author
Matthias Clasen
<mclasen@redhat.com>
Sat, 30 Jan 2016 21:06:59 +0000
(16:06 -0500)
committer
Matthias Clasen
<mclasen@redhat.com>
Sat, 30 Jan 2016 21:06:59 +0000
(16:06 -0500)
Creating style context won't work without a display, so
give a clear error message and abort instead of segfaulting
later on.
https://bugzilla.gnome.org/show_bug.cgi?id=761332
gtk/gtkstylecontext.c
patch
|
blob
|
history
diff --git
a/gtk/gtkstylecontext.c
b/gtk/gtkstylecontext.c
index ae47e8b315df43a82f7489644e32edbd3f9eb09c..7d5664af8044c63411263b7187e4d863aa0fc156 100644
(file)
--- a/
gtk/gtkstylecontext.c
+++ b/
gtk/gtkstylecontext.c
@@
-330,6
+330,9
@@
gtk_style_context_init (GtkStyleContext *context)
priv->screen = gdk_screen_get_default ();
+ if (priv->screen == NULL)
+ g_error ("Can't create a GtkStyleContext without a display connection");
+
priv->property_cache = g_array_new (FALSE, FALSE, sizeof (PropertyValue));
gtk_style_context_set_cascade (context,